#include "stdafx.h"
#include "TcpSocket.h"

class Buffer
{
public:
    char c[1024];
};

int main()
{
    TcpSocket *tcpSocket = new TcpSocket();
    bool is_con = tcpSocket->Connect("127.0.0.1", 6668);

    if (is_con)
    {
        while (1)
        {
            Buffer buf;
            std::cin >> buf.c;
            tcpSocket->Send<Buffer>(&buf);
        }
    }
    else
    {
        LOGI("Cannot connect to socket", "");
    }

    return 0;
}